﻿using System; using HISModels.ViewModel;
using System.Web;
using SignalR;

namespace HIS.Push {

    public class HubClientIdFactory : IConnectionIdFactory {

        public string CreateConnectionId(SignalR.Hosting.IRequest request) {
             string encryptedTicket = string.Empty;
             try {
                 encryptedTicket = KeanuMvc.Reference.CryptoString.Decrypt(request.Cookies["userticketdata"]);
             } catch { }
             return encryptedTicket.Split('|')[0];
        }
    }

}